﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using GCELibrary.Current;
 
using System.Linq.Dynamic;
 
using System.Xml.Linq;
using System.Data;
using ZF.BLL;
namespace GCEVideoMonitor.Person
{

    public partial class Left : ZF.BLL.Page.GMPage
    {
        public ZF.Model.US_Member Expert { get; set; }



        protected void Page_Load(object sender, EventArgs e)
        {
            using (var dc = SiteInfo.CreateDBDataContext())
            {
                Expert = dc.US_Member.FirstOrDefault(p => p.MemberId == this.CurrentUser.MemberId);

                if (Expert == null)
                {
                    throw WarnFactory.CreateWarn(WarnCode.ReocrdNoFind);
                }
                if (this.mvList != null)
                {
                    foreach (View view in this.mvList.Views)
                    {
                        if (view is ZF.BLL.UserControls.View)
                        {
                            if (((ZF.BLL.UserControls.View)view).Key == Expert.ExpertType.ToString())
                            {
                                this.mvList.SetActiveView(view);
                                break;
                            }
                        }
                    }
                }
                

            }
        }

         
       
    }
     
}
